package net.avh4.scratch.rpg;

import java.io.IOException;

public class LandmassWorldMap extends CachedWorldMap {
	
	public LandmassWorldMap() throws IOException {
		super();
		createLandmass(20,15);
	}
	
	private void createLandmass(int centerX, int centerY) {
		double weightY = 10;
		double factorY = rand.nextFloat() * 1.5;
		
		for (int j = 0; j > -weightY; j--) {
			double weightX = weightY - Math.pow(Math.abs(j), factorY);
			for (int i = 0; i > -weightX; i--) {
				setTile(centerX + i, centerY + j, 0);
			}
			for (int i = 1; i < weightX; i++) {
				setTile(centerX + i, centerY + j, 0);			
			}
		}
	}

}
